<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>

<div class="content_container">
    Registration Form
    <div id="form_reg">
        <?php
        $attr = array('name' => 'regform',
            'onsubmit' => 'return validate();'
        );
        ?>
<?php echo form_open_multipart('registration/submit/', $attr); ?>
        <?php 
            if ($fail){
        ?>
            <div id="username_taken">Username is already taken</div>
        <?php } ?>
        <div id="team_details">
            <div class="form_reg_subtitle">Team Details</div>
            <br/>
            <br/>

            <div class="form_row"><div class="name_label">Team Name : </div><div id="teamname_field"><?php echo form_input($team_name) ?></div></div> 
            <div class="error_message" id="invalid_teamname"></div>
            <div class="form_row"><div class="name_label">Participant 1  name :  </div><div id="membername_field_1"><?php echo form_input($member_name_1) ?> (team leader)</div></div>
            <div class="error_message" id="invalid_membername1"></div>
            <div class="form_row"><div class="name_label">Participant 2 name : </div><div class="membername_field"><?php echo form_input($member_name_2) ?></div></div>
            <div class="error_message" id="invalid_membername2"></div>
            <div class="form_row"><div class="name_label">Participant 3 name : </div><div class="membername_field"><?php echo form_input($member_name_3) ?></div></div>
            <div class="error_message" id="invalid_membername3"></div>
            <div class="form_row"><div class="name_label">Participant 4 name : </div><div class="membername_field"><?php echo form_input($member_name_4) ?></div></div>
            <div class="error_message" id="invalid_membername4"></div>
            <div class="form_row"><div class="name_label">Username : </div><div id="username_field"><?php echo form_input($username) ?></div></div>
            <div class="error_message" id="invalid_username"></div>
            <div class="form_row"><div class="name_label">Password : </div><div id="password_field"><?php echo form_password($password) ?></div></div>
            <div class="form_row"><div class="name_label">Re-type Password : </div><div id="repassword_field"><?php echo form_password($repassword) ?></div></div>
            <div class="error_message" id="password_mismatch"></div>
            <div class="form_row"><div class="name_label">University : </div><div id="university_field"><?php echo form_input($university) ?></div></div>
            <div class="form_row"><div class="name_label">Country :  </div>
                <div id="select_country">
                    <select id="countries" name="countries" onchange="showhide_province();">
                        <option value="Brunei Darussalam">Brunei Darussalam</option>
                        <option value="Cambodia">Cambodia</option>
                        <option value="China">China</option>
                        <option value="Indonesia" selected>Indonesia</option>
                        <option value="Laos">Laos</option>
                        <option value="Malaysia">Malaysia</option>
                        <option value="Myanmar">Myanmar</option>
                        <option value="Philippines">Philippines</option>
                        <option value="Singapore">Singapore</option>
                        <option value="Thailand">Thailand</option>
                        <option value="Vietnam">Vietnam</option>
                    </select>
                </div>
            </div>
<?php //buat zone, ditentuin otomatis dari province   ?>
            <div class="form_row" id="province"><div class="name_label">Province : </div>
                <div id="select_province">
                    <select id="indo_provinces" name="indo_provinces">
                        <option value="Nangroe Aceh Darussalam">Nangroe Aceh Darussalam</option>
                        <option value="Sumatera Utara">Sumatera Utara</option>
                        <option value="Sumatera Barat">Sumatera Barat</option>
                        <option value="Riau">Riau</option>
                        <option value="Jambi">Jambi</option>
                        <option value="Sumatera Selatan">Sumatera Selatan</option>
                        <option value="Bengkulu">Bengkulu</option>
                        <option value="Lampung">Lampung</option>
                        <option value="Kepulauan Bangka Belitung">Kepulauan Bangka Belitung</option>
                        <option value="Kepulauan Riau">Kepulauan Riau</option>
                        <option value="DKI Jakarta">DKI Jakarta</option>
                        <option value="Jawa Barat">Jawa Barat</option>
                        <option value="Jawa Tengah">Jawa Tengah</option>
                        <option value="DI Yogyakarta">DI Yogyakarta</option>
                        <option value="Jawa Timur">Jawa Timur</option>
                        <option value="Banten">Banten</option>
                        <option value="Bali">Bali</option>
                        <option value="Nusa Tenggara Barat">Nusa Tenggara Barat</option>
                        <option value="Nusa Tenggara Timur">Nusa Tenggara Timur</option>
                        <option value="Kalimantan Barat">Kalimantan Barat</option>
                        <option value="Kalimantan Tengah">Kalimantan Tengah</option>
                        <option value="Kalimantan Selatan">Kalimantan Selatan</option>
                        <option value="Kalimantan Timur">Kalimantan Timur</option>
                        <option value="Sulawesi Utara">Sulawesi Utara</option>
                        <option value="Sulawesi Tengah">Sulawesi Tengah</option>
                        <option value="Sulawesi Selatan">Sulawesi Selatan</option>
                        <option value="Sulawesi Tenggara">Sulawesi Tenggara</option>
                        <option value="Gorontalo">Gorontalo</option>
                        <option value="Sulawesi Barat">Sulawesi Barat</option>
                        <option value="Maluku">Maluku</option>
                        <option value="Maluku Utara">Maluku Utara</option>
                        <option value="Papua Barat">Papua Barat</option>
                        <option value="Papua">Papua</option>
                    </select>
                </div>
            </div>
            <div class="form_row"><div class="name_label">E-mail : </div><div id="email_field"><?php echo form_input($email) ?></div></div>
            <div class="error_message" id="invalid_email"></div>
        </div>
        <div id="adm_upload">
            <div class="form_reg_subtitle">Upload your Administration Requirement<br/>
            </div>
            <br/>
            <div id="allowed_types">(allowed file types: jpg, png, gif)</div>
            <div class="form_row">
                <div>Letter from Campus : <input type="file" id="letter" name="letter"/></div>


                <div id="help_icon">
                    <img src="<?= base_url() . 'images/help-icon.png' ?>" width="16" height="16" alt="help"/>
                    <div id="help_text">Submit a scanned letter from your respective universities,
                        confirming your status as current students.</div>
                </div>

            </div>
            <br/>
            <div class="form_reg_subtitle">Each member's Student ID Card :<br/><br/></div>
            
            <div class="form_row">Student ID Card 1 : <input type="file" class="id_card" name="id_card_1" id="id_card_1"/></div>
                <div id="help_icon_2">
                    <img src="<?= base_url() . 'images/help-icon.png' ?>" width="16" height="16" alt="help"/>
                    <div id="help_text_2">Submit a scanned picture of your student ID-Card</div>
                </div>
            <div class="form_row">Student ID Card 2 : <input type="file" class="id_card" name="id_card_2" id="id_card_2"/></div>
            <div class="form_row">Student ID Card 3 : <input type="file" class="id_card" name="id_card_3" id="id_card_3"/></div>
            <div class="form_row">Student ID Card 4 : <input type="file" class="id_card" name="id_card_4" id="id_card_4"/></div>
            <br/>
            <div class="form_reg_subtitle">Each member's Curriculum Vitae :<br/><br/></div>
            <div class="form_row">Curriculum Vitae 1 : <input type="file" class="cv" name="cv_1" id="cv_1"/> (team leader)</div>
            <div class="form_row">Curriculum Vitae 2 : <input type="file" class="cv" name="cv_2" id="cv_2"/></div>
            <div class="form_row">Curriculum Vitae 3 : <input type="file" class="cv" name="cv_3" id="cv_3"/></div>
            <div class="form_row">Curriculum Vitae 4 : <input type="file" class="cv" name="cv_4" id="cv_4"/></div>


            <?php echo form_submit($submit); ?>

<?php echo form_close(); ?>

        </div>
    </div>